<template>
    <ElPagination v-model:current-page="pageInfo!.current" v-model:page-size="pageInfo!.size"
        :page-sizes="setting.paginationPageSizeList" background layout="->, total, sizes, prev, pager, next, jumper"
        :total="pageInfo!.total" @change="pageInfoChange" />
</template>

<script setup lang="ts">
import type { PageQueryVO } from '@/api/type/baseType';
import setting from '@/setting';
import { ElPagination } from 'element-plus';
import { computed, ref } from 'vue';

/**
 * 分页数据
 */
const pageInfo = defineModel<PageQueryVO<any>>()

// 父组件自定义事件
const emit = defineEmits(['pageInfoChange'])

// 当每页条目或页码改变时的回调
const pageInfoChange = (pageNum: number, pageSize: number) => {
    emit('pageInfoChange')
}

</script>

<style scoped lang="scss"></style>